home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 75 / XENIATGM75.iso / Shareware / X-Setup 5.0 / _SETUP.1 / XQ MSO2K Folders 1.xpl < prev    next >
Text File  |  1999-07-17  |  2KB  |  69 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="4"
  3. "COUNT"="3"
  4. "UIPATH"="System\File System\Data Folders"
  5. "NAME"="Office 2000 Folders #1"
  6. "VERSION"="1.1"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Templates"
  9. "TEXT 2"="Shared Templates"
  10. "TEXT 3"="Queries"
  11. "DESCRIPTION 1"="You can alter the location of different MS Office folders here."
  12. "DESCRIPTION 2"="Please exit all Office programs before changing this settings."
  13. "AUTHOR"="Xteq Systems"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  16.  
  17.  
  18. sP="HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Common\General\"
  19. sTMP="UserTemplates" 'STR W9x - xSTR WNT
  20. sSTM="SharedTemplates" 
  21. sQRY="UserQueriesFolder"
  22. '"WorkgroupThemes"
  23.  
  24.  
  25. Sub Plugin_Initialize 
  26. ' if RegPathExists(sP) then
  27.   s=RegReadValue(sP & sTMP)
  28.   SetUIElement 1,s
  29.  
  30.   s=RegReadValue(sP & sSTM)
  31.   SetUIElement 2,s
  32.  
  33.   s=RegReadValue(sP & sQRY)
  34.   SetUIElement 3,s
  35. ' else
  36. '  Disable
  37. ' end if
  38. End Sub
  39.  
  40. Sub Plugin_CheckData(ElementIndex)
  41. End Sub
  42.  
  43. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  44.  Call Wrt(1,sP & sTMP)
  45.  Call Wrt(2,sP & sSTM)
  46.  Call Wrt(3,sP & sQRY)
  47.  
  48.  Call Logoff()
  49. End Sub
  50.  
  51.  
  52. Sub Wrt(ITM,VAL)
  53.  s=GetUIElement(ITM)
  54.  if len(s)>0 then 
  55.   
  56.     if Right(s,1)="\" then
  57.        s=left(s,len(s)-1)
  58.     end if
  59.     Call RegWriteValue(VAL,s,1)
  60.  else
  61.     s=RegReadValue(VAL)
  62.     if IsEmpty(s)=false then Call RegDeleteValue(VAL)
  63.  end if
  64. end sub
  65.  
  66.  
  67. Sub Plugin_Terminate 
  68. End Sub
  69.